import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store/index';
import { setupRouterGuard } from '@/router/guard';
import Antd from 'ant-design-vue';
import * as Icons from '@ant-design/icons-vue';
// import Directives from './directives/index';
import CommonComponent from './components/index';
import 'ant-design-vue/dist/antd.less';
// 注册svg图标
// import 'virtual:svg-icons-register';
// import '@/assets/font-icons/iconfont.js';
async function initApp() {
    const app = createApp(App);
    app.use(CommonComponent);
    const icons: any = Icons;
    for (const i in icons) {
        app.component(i, icons[i]);
    }
    app.use(Antd);
    //   app.use(Directives);
    app.use(store);
    app.use(router);

    // setupStore(app);
    // 路由守卫
    setupRouterGuard(router);
    app.mount('#app');
}
initApp();
